%!PS-Adobe-3.0

% Begin Logo to PostScript utility functions
/angle 0 def

/red 0 def
/green 0 def
/blue 0 def
/linewidth 0.1 def

/Arg 0 def

300 500 newpath moveto

/left {
	angle
	exch
	add
	Trueheading

	/angle
		exch
	def
} def

/right {
	angle
	exch
	sub
	Trueheading

	/angle
		exch
	def
} def

/forward {
	setcolours
	linewidth setlinewidth

	dup
	angle
	cos
	mul
	exch
	angle
	sin
	mul
	rlineto
	
	currentpoint
	stroke
	moveto
} def

/Trueheading {
	round
	360 mod dup
	0 lt
	{
		360 add
	} if
} def

/setred {
	/red
		exch
		255
		div
	def
} def

/setgreen {
	/green
		exch
		255
		div
	def
} def

/setblue {
	/blue
		exch
		255
		div
	def
} def

/setcolours
{
	red green blue setrgbcolor
} def

/setstrokewidth {
	10 div
	/linewidth exch def
} def
% End Logo -> PostScript utilities
